<h1>Редактирование профиля</h1>
<form
	action="<?=MozgRoute::Get('http')->Create(array('module' => 'admin', 'ctrl' => 'users', 'action' => 'save_profile'));?>"
	method="post" enctype="multipart/form-data">
<table width=100% border=0 cellspacing=1 cellpadding=4 align="center" class="formTable">
	<tr>
		<td class="field-title"><label>Группа</label></td>
		<td class="field-place"><?=$this->user->GetGroupName();?></td>
	</tr>
	<tr>
		<td class="field-title"><label>Логин</label></td>
		<td class="field-place"><?=$this->user->GetUserName();?></td>
	</tr>
	<tr>
		<td class="field-title"><label>Имя</label></td>
		<td class="field-place"><input name="fullname" type=text
			value="<?=htmlspecialchars($this->user->GetFullName());?>"></td>
	</tr>
	<tr>
		<td class="field-title"><label>Email</label></td>
		<td class="field-place"><input name="email" type=text
			value="<?=htmlspecialchars($this->user->GetEmail());?>"></td>
	</tr>
	<tr>
		<td class="field-title"><label>Аватар</label></td>
		<td class="field-place">
		<?php 
			if ($this->user->GetAvatar())
			{
		?>
		<img src="<?=_ROOT_URL.$this->thumbPath.$this->user->GetAvatar();?>">
		<?php 
			}
		?><br>			
		<input type="file" name="avatar"></td>
	</tr>		
	<tr>
		<td class="field-title"><label>Пароль</label></td>
		<td class="field-place"><input name="password1" type="password"></td>
	</tr>
	<tr>
		<td class="field-title"><label>Повторите пароль</label></td>
		<td class="field-place"><input name="password2" type="password"></td>
	</tr>
</table>
<table>
	<tr>
		<td class="r"><input type="submit" value="Сохранить" class="bt" /></td>
		<td class="l"><input type="button" value="Назад" class="bt"
			onClick="window.location.href='<?=MozgRoute::Get('http')->Create(array('module' => 'admin', 'ctrl' => 'users', 'action' => 'view_profile'));?>';" /></td>
	</tr>
</table>
</form>